# detection/about_menu.py
from PyQt5.QtWidgets import QAction, QMessageBox
from PyQt5.QtCore import QObject

class AboutMenu(QObject):
    """
    关于菜单模块
    """
    def __init__(self, parent):
        super().__init__(parent)
        self.parent = parent
        self._create_actions()

    def _create_actions(self):
        self.about_action = QAction("关于", self.parent)
        self.about_action.triggered.connect(self.show_about)

    def show_about(self):
        QMessageBox.information(
            self.parent,
            "关于 YOLO 检测软件",
            "YOLO目标检测软件\n版本: 1.0\n作者: ll"
        )
